package com.java.auth.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.java.common.utils.R;
import com.java.model.system.SysUser;
import com.java.vo.system.SysUserQueryVo;

import java.util.List;

public interface SysUserService extends IService<SysUser> {
    /**
     * 分页条件查询
     * @param current
     * @param limit
     * @param sysUserQueryVo
     */
    R select(Long current, Long limit, SysUserQueryVo sysUserQueryVo);

    /**
     * 根据id查找用户
     * @param id
     * @return
     */
    R selectById(Long id);

    /**
     * 保存用户
     * @param sysUser
     * @return
     */
    R saveUser(SysUser sysUser);


    R update(SysUser sysUser);

    /**
     * 根据id删除用户
     * @param id
     * @return
     */
    R deleteById(Long id);

    /**
     * 批量删除
     * @param ids
     * @return
     */
    R deleteBatch(List<Long> ids);

    /**
     * 更新用户状态
     * @param id
     * @param status
     * @return
     */
    R updateStatus(Long id, Integer status);

    SysUser getByUsername(String username);

    R getCurrentUser();

}
